import jsonp from 'jsonp'
import axios from 'axios'
export const Jsonp = ( params )=>{
    return new Promise((resolve,reject)=>{
        jsonp( params.url, {
            param: 'callback'
        },function (err, response) {
            if(response.status === "success"){
                resolve(response)
            }else{
                reject(response.message)
            }
        })
    })
}
export const axiosGet = (params)=>{
    return new Promise((resolve, reject)=>{
        axios.get(params.url).then((res)=>{
            console.log(res)
            if(res.status === 200){
                resolve(res.data)
            }else{
                reject()
            }
        })
    })
}